/*
 * renderer.h
 *
 *  Created on: Jan 12, 2011
 *      Author: dima
 */

#ifndef RENDERER_H_
#define RENDERER_H_

#include "prerequisites.h"

#include "platform.h"

#include "material.h"
#include "geometrybuffer.h"

class Renderer
{
	friend class Engine;

	SDL_WindowID mWindowID;
	SDL_GLContext mGLContext;

	float mvp_matrix[16];

	//test
	Material* mat;
	GeometryBuffer* geo;

public:
	Renderer();
	virtual ~Renderer();

	void init();
	void destroy();
	void activateGLContext();
	void deleteGLContext();
	void render();

private:

	Material* mActiveMaterial;
	void setGlobalUniforms();
};

#endif /* RENDERER_H_ */
